public class NatCloneTest implements Cloneable{

    private int num = 1;

    @Override
    public NatCloneTest clone() {
        try {
            return (NatCloneTest) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }

    public static void main(String[] args) {
        NatCloneTest test1 = new NatCloneTest();
        NatCloneTest test2 = test1.clone();
        test1.num = 2;
        System.out.println(test1.num);
        System.out.println(test2.num);
    }
}
